// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using System;
using System.Linq;
using Elastic.Clients.Elasticsearch.Serialization;

namespace Elastic.Clients.Elasticsearch.Security;

[System.Text.Json.Serialization.JsonConverter(typeof(Elastic.Clients.Elasticsearch.Security.Json.RestrictionWorkflowConverter))]
public readonly partial struct RestrictionWorkflow : Elastic.Clients.Elasticsearch.Serialization.IEnumStruct<Elastic.Clients.Elasticsearch.Security.RestrictionWorkflow>
{
	public RestrictionWorkflow(string value) => Value = value;
#if NET7_0_OR_GREATER
	static RestrictionWorkflow IEnumStruct<RestrictionWorkflow>.Create(string value) => value;
#else
	RestrictionWorkflow IEnumStruct<RestrictionWorkflow>.Create(string value) => value;
#endif
	public readonly string Value { get; }
	public static RestrictionWorkflow SearchApplicationQuery { get; } = new RestrictionWorkflow("search_application_query");

	public override string ToString() => Value ?? string.Empty;

	public static implicit operator string(RestrictionWorkflow @enum) => @enum.Value;
	public static implicit operator RestrictionWorkflow(string value) => new(value);

	public override int GetHashCode() => Value.GetHashCode();
	public override bool Equals(object obj) => obj is RestrictionWorkflow other && this.Equals(other);
	public bool Equals(RestrictionWorkflow other) => Value == other.Value;

	public static bool operator ==(RestrictionWorkflow a, RestrictionWorkflow b) => a.Equals(b);
	public static bool operator !=(RestrictionWorkflow a, RestrictionWorkflow b) => !(a == b);
}